/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package co.edu.uniandes.vehialpes.garantias;

import java.util.Date;
import javax.ejb.Singleton;
import javax.ejb.LocalBean;

/**
 *
 * @author alvar-go@uniandes.edu.co
 */
@Singleton
@LocalBean
public class GarantiasBean {

    // Add business logic below. (Right-click in editor and choose
    // "Insert Code > Add Business Method")
    private AdministradorGarantias admin;
    
    public GarantiasBean(){
        admin = new AdministradorGarantias();
    }
    
    public boolean estaEnGarantia(String idVehiculo)throws Exception{
        return admin.estaEnGarantia(idVehiculo);
    }
    
    public Vehiculo darVehiculo(String idVehiculo){
        return admin.buscarVehiculo(idVehiculo);
    }
    
    public void registrarReparacion(String taller, String vehiculo, Date fecha, String descripcion, double costo) throws Exception{
        admin.registrarReparacion(taller, vehiculo, fecha, descripcion, costo);
    }
    
    
    public Reparacion darReparacion(String idVehiculo){
        return admin.darReparacion(idVehiculo);
    }
    
}
